package com.naxiang.zhaohang.naxiangvido;

import android.graphics.Color;
import android.widget.RelativeLayout;
import android.widget.Toast;

import com.uzmap.pkg.uzcore.UZResourcesIDFinder;
import com.uzmap.pkg.uzcore.UZWebView;
import com.uzmap.pkg.uzcore.uzmodule.UZModule;
import com.uzmap.pkg.uzcore.uzmodule.UZModuleContext;

/**
 * 作者: 赵航
 * 创建时间: 2018/7/4 20:47
 * 描述:
 */
public class NaXiangVidoPlay extends UZModule {

    private  RelativeLayout mVidoLayout;

    public NaXiangVidoPlay(UZWebView webView) {
        super(webView);
    }
    //打开地理选择器
    public void jsmethod_openVido(UZModuleContext moduleContext) {
        Toast.makeText(mContext,"打开了",Toast.LENGTH_LONG).show();


        int vidoLayout = UZResourcesIDFinder.getResLayoutID("vidoplaylay");

        mVidoLayout= (RelativeLayout) mContext.getLayoutInflater().inflate(vidoLayout, null);

        mVidoLayout.setBackgroundColor(Color.RED);
        RelativeLayout.LayoutParams params=new RelativeLayout.LayoutParams(200,200);

        params.setMargins(100,100,0,0);

        insertViewToCurWindow(mVidoLayout,params,"index_frm",false);
    }
    public void jsmethod_remveView(UZModuleContext moduleContext) {
        removeViewFromCurWindow(mVidoLayout);
    }

    public void jsmethod_putBig(UZModuleContext moduleContext) {
        mVidoLayout.setBackgroundColor(Color.GREEN);
        RelativeLayout.LayoutParams params=new RelativeLayout.LayoutParams(300,300);

        params.setMargins(100,100,0,0);

        insertViewToCurWindow(mVidoLayout,params,"index_frm",false);

    }

}
